#include "gprs_task.h"
#include "platformAPI.h"
#include "gprs_command.h"
//#include "stream_parse.h"

#define tskGPRS_PRIORITY (tskIDLE_PRIORITY + 9) 

static void gprs_runtime(void *param)
{
    uint32_t count;
    while(1)
    {
	gprsRuntime();
	systemDelayMs(50);
	count++;
	if(count == 200)
	{
	    //gprsCheckCon();
	    count = 0;
	}
    }
}

void startGprsRuntime(void)
{
    /*start the application controller*/
    if(xTaskCreate(gprs_runtime, 
		   ((const char*)"gprs_runtime"), 
		   2500, 
		   NULL, 
		   tskGPRS_PRIORITY, 
		   NULL) != pdPASS)
    {
        printf("\n\r%s xTaskCreate(gprs_runtime) failed", __FUNCTION__);
    }	
}
